package com.lk.recvice.mq.sender;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ReportDataSender {

	 @Autowired
	 RabbitTemplate rabbitTemplate;  //使用RabbitTemplate,这提供了接收/发送等等方法


	 public void doSend(String message) {
		 rabbitTemplate.convertAndSend("ReportDatas_DirectExchange_Modbus_Client", "ReportDatas_DirectRouting_Modbus_Client", message);
	 }
	 
}
